﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace ChikovMF.Context.EntityConfigurations;

public class ImageConfiguration : IEntityTypeConfiguration<Entities.File>
{
    public void Configure(EntityTypeBuilder<Entities.File> builder)
    {
        builder.ToTable("Files");
        builder.HasKey(file => file.Id);
        builder.Property(file => file.Name).HasMaxLength(64).IsRequired();
    }
}
